<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <App></App>
    </div>
  </body>
  <script>
    //如果使用Vue.extend创建一个组件,则得到一个VueComponent构造函数
    // const App = Vue.extend({})
    //创建组件的时候,Vue提供了一个简写,可以直接书写为一个配置对象即可
    const App = {
      name: "App",
      template: `
        <div>App</div>
        
        `,
    };

    const vm = new Vue({
      el: "#app",
      components: {
        App,
      },
      data() {
        return {};
      },
    });
  </script>
</html>
